﻿* Encoding: UTF-8.


*Utilitarian micro: labour market status ESS* 

RECODE mnactic (1=1) (2=2) (MISSING=SYSMIS) (3 thru 4=3) (6=4) (ELSE=5) INTO employment_staus.
EXECUTE.

*Cue taking macro: Seat share anti establishment CPDS*

COMPUTE Seat_share_right=sright1 + sright2 + sright3 + sright4 + sright5 + sregio1.
EXECUTE.

COMPUTE Seat_share_communist=scomm1 + scomm2 + scomm3 + scomm4 + spostcom1 + spostcom2.
EXECUTE.


COMPUTE seat_Share_protest=sprotest1 + sprotest2 + sprotest3 + sprotest4.
EXECUTE.

COMPUTE Anti_establisment_seat_share=seat_Share_protest + Seat_share_right + Seat_share_communist.
EXECUTE.

*Identity model micro: Multiculturalism*
 
COMPUTE Multi_cultural=imbgeco + imueclt + imwbcnt.
EXECUTE.

*Reference model: Trust in the political establishment*

COMPUTE  Institutional_trust=trstprl + trstlgl + trstplc + trstplt + trstprt.
EXECUTE.


*standardizing the independent variables*

DESCRIPTIVES VARIABLES= bci_bci stfeco stfgov eduyrs 
 Institutional_trust agea OperatingbudgetarybalanceGNI Anti_establisment_seat_share gov_chan
    Multi_cultural  lrscale   al_ethnic 
  /SAVE
  /STATISTICS=MEAN STDDEV MIN MAX.

RECODE fed (0=0) (1 thru 2=1) INTO fed_d.
EXECUTE.


RECODE essround (6 thru 7=1) (ELSE=0) INTO Before_after_crissi.
EXECUTE.


RECODE brncntr (1=0) (2=1) (MISSING=SYSMIS) INTO Immigrant.
EXECUTE.


* welfare regime*

RECODE cntry ('AT'=1) ('BE'=1) ('BG'=5) ('CH'=1) ('CY'=3) ('CZ'=5) ('DE'=1) ('DK'=2) ('NO'=2) ('EE'=5) ('ES'=3) 
    ('FI'=2) ('FR'=1) ('GB'=4) ('GR'=3) ('HU'=5) ('IE'=4) ('RU'=5) ('IT'=3) ('IS'=2) ('NL'=1) ('PL'=5) ('PT'=3) ('SE'=2) ('SI'=5) ('SK'=5) 
    ('UA'=5) INTO welfare.




*Table 7 Model 0*

MIXED euftf BY gndr gov_chan  employment_staus  WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI ZAnti_establisment_seat_share 
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi emu 
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED= | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION CPS TESTCOV
  /RANDOM=INTERCEPT | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.

*Table 7 Model 1*

MIXED euftf BY gndr gov_chan  employment_staus WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI ZAnti_establisment_seat_share 
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi emu
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant   employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale  | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION CPS TESTCOV
  /RANDOM=INTERCEPT | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.



*Table 7 Model 2 * 

MIXED euftf BY gndr employment_staus  WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI ZAnti_establisment_seat_share 
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi emu Zgov_chan fed_d Zal_ethnic 
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant  employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale Before_after_crissi 
ZOperatingbudgetarybalanceGNI fed_d Zal_ethnic Zbci_bci  Zgov_chan ZAnti_establisment_seat_share  emu | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION TESTCOV
  /RANDOM=INTERCEPT | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.



*Table 8 Model 1 *

MIXED euftf BY gndr employment_staus WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI  
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi  Zgov_chan fed_d
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant   employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale Zbci_bci ZOperatingbudgetarybalanceGNI   fed_d Before_after_crissi 
  | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION TESTCOV CPS
  /RANDOM=INTERCEPT Zeduyrs ZMulti_cultural ZInstitutional_trust    | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.



*Table 8 Model 2 *

MIXED euftf BY gndr employment_staus WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI  
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi  Zgov_chan fed_d
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant   employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale Zbci_bci ZOperatingbudgetarybalanceGNI   fed_d Before_after_crissi ZOperatingbudgetarybalanceGNI*Zeduyrs
  | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION TESTCOV CPS
  /RANDOM=INTERCEPT Zeduyrs ZMulti_cultural ZInstitutional_trust    | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.


*table 8 Model 3 *

MIXED euftf BY gndr employment_staus WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI  
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi  Zgov_chan fed_d
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant   employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale Zbci_bci ZOperatingbudgetarybalanceGNI   fed_d Before_after_crissi  ZMulti_cultural*fed_d
  | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION TESTCOV CPS
  /RANDOM=INTERCEPT Zeduyrs ZMulti_cultural ZInstitutional_trust    | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.


*Table 8 Model 4*


MIXED euftf BY gndr employment_staus WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI  
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi  Zgov_chan fed_d
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant   employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale Zbci_bci ZOperatingbudgetarybalanceGNI   fed_d Before_after_crissi ZInstitutional_trust* Zbci_bci
  | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION TESTCOV CPS
  /RANDOM=INTERCEPT Zeduyrs ZMulti_cultural ZInstitutional_trust    | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.





*Appendix regression* 

MIXED euftf BY gndr employment_staus welfare  WITH Zbci_bci Zstfeco Zstfgov Zeduyrs 
    ZInstitutional_trust Zagea ZOperatingbudgetarybalanceGNI ZAnti_establisment_seat_share 
    ZMulti_cultural  Immigrant Zlrscale Before_after_crissi emu Zgov_chan fed_d Zal_ethnic 
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, 
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=gndr Zagea Zeduyrs  Immigrant  employment_staus ZMulti_cultural ZInstitutional_trust Zstfeco Zstfgov Zlrscale Before_after_crissi 
ZOperatingbudgetarybalanceGNI fed_d Zal_ethnic Zbci_bci  Zgov_chan ZAnti_establisment_seat_share  emu welfare| SSTYPE(3)
  /METHOD=REML
  /PRINT= CPS SOLUTION TESTCOV
  /RANDOM=INTERCEPT | SUBJECT(cntry*essround) COVTYPE(VC)
  /RANDOM=INTERCEPT | SUBJECT(cntry) COVTYPE(VC)
 /SAVE=FIXPRED.








